Skip to content

Fix logic managing dll search path and path when initializing dpctl #2130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ndgrigorian
Copy link
Collaborator

This PR refactors some logic in dpctl managing the DLL search path, also adding the dpctl __init__.py directory to the PATH, matching the logic in dpnp, in an attempt to fix dpctl being imported from virtual environments failing to see devices or find SYCL dlls

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?
  • If this PR is a work in progress, are you opening the PR as a draft?

Copy link

github-actions bot commented Aug 5, 2025

Copy link

github-actions bot commented Aug 5, 2025

Array API standard conformance tests for dpctl=0.21.0dev0=py310h93fe807_93 ran successfully.
Passed: 1115
Failed: 6
Skipped: 119

@coveralls
Copy link
Collaborator

coveralls commented Aug 5, 2025

Coverage Status

coverage: 85.902% (+0.02%) from 85.878%
when pulling 2680eb8 on fix-dpctl-import-from-venv-windows
into 3381d14 on master.

@ndgrigorian ndgrigorian marked this pull request as ready for review August 5, 2025 21:22
antonwolfy
antonwolfy previously approved these changes Aug 5, 2025
Copy link
Collaborator

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ndgrigorian for resolving the issue

Copy link

github-actions bot commented Aug 5, 2025

Array API standard conformance tests for dpctl=0.21.0dev0=py310h93fe807_93 ran successfully.
Passed: 1115
Failed: 6
Skipped: 119

@desmondsow
Copy link

@ndgrigorian LGTM. I can confirm it is now working without first importing dpnp.

(env) PS C:\Users\***\***> uv pip freeze
dpcpp-cpp-rt==2025.2.0
dpctl @ file:///C:/Users/***/***/dpctl-0.21.0.dev0+93.gef00863734-93-cp312-cp312-win_amd64.whl
dpnp==0.18.1
intel-cmplr-lib-rt==2025.2.0
intel-cmplr-lib-ur==2025.2.0
intel-cmplr-lic-rt==2025.2.0
intel-opencl-rt==2025.2.0
intel-openmp==2025.2.0
intel-sycl-rt==2025.2.0
mkl==2025.2.0
numpy==2.3.2
onemkl-sycl-blas==2025.2.0
onemkl-sycl-dft==2025.2.0
onemkl-sycl-lapack==2025.2.0
onemkl-sycl-rng==2025.2.0
onemkl-sycl-stats==2025.2.0
onemkl-sycl-vm==2025.2.0
tbb==2022.2.0
tcmlib==1.4.0
umf==0.11.0

(env) PS C:\Users\***\***> python -m dpctl --full-list
Platform  0 ::
    Name        Intel(R) oneAPI Unified Runtime over Level-Zero
    Version     1.6
    Vendor      Intel(R) Corporation
    Backend     ext_oneapi_level_zero
    Num Devices 2
      # 0
        Name                Intel(R) Data Center GPU Flex Series 140
        Version             1.6.33511
        Filter string       level_zero:gpu:0
      # 1
        Name                Intel(R) Data Center GPU Flex Series 140
        Version             1.6.33511
        Filter string       level_zero:gpu:1
Platform  1 ::
    Name        Intel(R) oneAPI Unified Runtime over Level-Zero
    Version     1.6
    Vendor      Intel(R) Corporation
    Backend     ext_oneapi_level_zero
    Num Devices 1
      # 0
        Name                Intel(R) Arc(TM) Graphics
        Version             1.6.33511
        Filter string       level_zero:gpu:2
Platform  2 ::
    Name        Intel(R) OpenCL Graphics
    Version     OpenCL 3.0
    Vendor      Intel(R) Corporation
    Backend     opencl
    Num Devices 1
      # 0
        Name                Intel(R) Arc(TM) Graphics
        Version             32.0.101.6881
        Filter string       opencl:gpu:0
Platform  3 ::
    Name        Intel(R) OpenCL Graphics
    Version     OpenCL 3.0
    Vendor      Intel(R) Corporation
    Backend     opencl
    Num Devices 2
      # 0
        Name                Intel(R) Data Center GPU Flex Series 140
        Version             32.0.101.6881
        Filter string       opencl:gpu:1
      # 1
        Name                Intel(R) Data Center GPU Flex Series 140
        Version             32.0.101.6881
        Filter string       opencl:gpu:2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants